﻿using MyEncodeOfVigenere.Model;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace MyEncodeOfVigenere
{
    public partial class frmMain : Form
    {
        public frmMain()
        {
            InitializeComponent();
        }
        private void btnDecode_Click(object sender, EventArgs e)
        {
            //用户输入明文和密钥
            string plain = this.textBox1.Text;
            string key = this.textBox2.Text;
            //加密
            MyEncoder myencoder = new MyEncoder();
            myencoder.PlainText = plain;
            myencoder.Key = key;
            myencoder.Encoder();
            this.textBox3.Text = myencoder.CipherText;
        }
    }
}
